<?php
namespace backend\controllers;

use common\models\info\Article;
use frontend\service\ArticleService;
use yii\web\Controller;

/**
 * Site controller
 */
class SiteController extends Controller
{

    public function actionIndex(){
        $result = ArticleService::getIndexData();
         return $this->render('index',[
               'data' => $result,
         ]);
    }
    /*
     * 资讯详情页
     */
    public function actionDetail($aid) {
        $DetailArticle = ArticleService::getDetailArticle($aid);
        return $this->render("detail",$DetailArticle);
    }

    /****
     * 分享
     */
    public function  actionShare(){
        $result = ArticleService::getRightMessage();
        return $this->render("share",$result);
    }
}
